package com.orcamento.service.filter;

public enum ListFilter {
	
	ALL("all"), 
	CURRENT_MONTH("currentMonth");
	
	String id;
	
	ListFilter(String id) {
		this.id = id;
	}
	
	public static ListFilter findEnumById(String id) {
		for( ListFilter filter : values() ) {
			if( filter.id.equals( id ) ) {
				return filter;
			}
		}
		return CURRENT_MONTH;
	}

	public boolean isAll() {
		return ALL.id == id;
	}
	
}
